<h1 class="user-title">{{title}}</h1>
<div class="form-group">
    <label>群发手机号：(最多100个)</label>
    <textarea class="form-control" rows="5" id="mobile" ng-model="mobiles"></textarea>
</div>
<div class="form-group">
    <label>短信内容：</label>
    <textarea class="form-control" rows="5" id="content" ng-model="content"></textarea>
</div>
<input type="button" class="btn btn-primary btn-lg send_btn" value="发送" disabled="disabled" ng-click="send()">
<script>
    var regMobile=/^(1[3|4|5|7|8]\d{9})(,(1[3|4|5|7|8]\d{9}))*$/;
    $(function(){
        var boolM=false;
        var boolC=false;
        $('#mobile').bind('input porpertychange',function(){
            var mobiles=$('#mobile').val();
            var regflag=regMobile.test(mobiles);
            if(!regflag){
                $('#mobile').css("color","red");
                boolM=false;
            }else{
                $('#mobile').css("color","black");
                boolM=true;
            }
            if(boolM==true&&boolC==true){
                $('.send_btn').removeAttr('disabled');
            }else{
                $('.send_btn').attr('disabled','disabled');
            }
        });
        $('#content').bind('input porpertychange',function(){
            var content=$('#content').val();
            boolC=(content!=null&&content!='');
            if(boolM==true&&boolC==true){
                $('.send_btn').removeAttr('disabled');
            }else{
                $('.send_btn').attr('disabled','disabled');
            }
        });

    });
</script>